home *** CD-ROM | disk | FTP | other *** search
- on getValues
- global currentAffected, total, initial, annual, term, rate, tvalue, rvalue, ivalue, avalue, yvalue
- if not (currentAffected = "t") then
- set incomeString to line 1 of the text of member "total"
- calcNum(incomeString)
- set incomeString to the result
- set tvalue to value(incomeString)
- calcDollar(incomeString)
- set incomeString to the result
- set the text of member "total" to incomeString
- end if
- if not (currentAffected = "i") then
- set incomeString to line 1 of the text of member "initial"
- calcNum(incomeString)
- set incomeString to the result
- set ivalue to value(incomeString)
- calcDollar(incomeString)
- set incomeString to the result
- set the text of member "initial" to incomeString
- end if
- if not (currentAffected = "a") then
- set incomeString to line 1 of the text of member "annual"
- calcNum(incomeString)
- set incomeString to the result
- set avalue to value(incomeString)
- calcDollar(incomeString)
- set incomeString to the result
- set the text of member "annual" to incomeString
- end if
- if not (currentAffected = "r") then
- set incomeString to line 1 of the text of member "rate"
- calcNum(incomeString)
- set incomeString to the result
- set rvalue to value(incomeString)
- set the text of member "rate" to rvalue & "%"
- end if
- if not (currentAffected = "y") then
- set incomeString to line 1 of the text of member "term"
- calcNum(incomeString)
- set incomeString to the result
- set yvalue to value(incomeString)
- if yvalue = 1 then
- set the text of member "term" to yvalue & " year"
- else
- set the text of member "term" to yvalue & " years"
- end if
- end if
- end
-